﻿using System;
namespace Aishishaifa;

class judge
{
    static void Main(string[] args)
    {
        bool [] Isprime = new bool[101];
        for (int i = 0; i < 101; i++)
            Isprime[i] = true;//初始化所有的数都为素数

        for(int i = 2; i < 101; i++)
        {
            if (Isprime[i]!)
            {
                int j; 
                for ( j = 2 * i; j < 101; j += i)
                    Isprime[j] = false;
            }
        }


        int n = 0;//计数素数的个数
        for (int i = 2; i < 101; i++)
        {
            if (Isprime[i]!)
                n++;
        }
            Console.WriteLine("素数个数为"+n);


        for (int i = 2; i < 101; i++)
        {
            if (Isprime[i]!)
            {
                Console.WriteLine("2-100素数有" + i);
            }
        }
    }
}